# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[GenericPlayerEventHandler.__init__(self, player)
self.player.sshow_interval = self.sshow_delays[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622f6c>}
nname: 0
n 0(None)[self.player.paused_hand_status = self.player.paused
self.player.paused = True
return GenericPlayerEventHandler.event_action_menu(self, event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622e6c>}
nname: 0
n 0(None)[self.player.toggle_pause()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622f4c>}
nname: 0
n 0(None)[louie_send('event_up', self.player)
self.player.select(-event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb762838c>}
nname: 0
n 0(None)[louie_send('event_up', self.player)
self.player.select(event.arg['count'])
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622dac>}
nname: 0
n 0(None)[return self.event_up(event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622d0c>}
nname: 0
n 0(None)[return self.event_down(event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7622dec>}
nname: 122
n 122(None)[return True
]:
	i: 12(), 97(), 121()
	o: 

nname: 121
n 121(None)[]:
	i: 44(f)
	o: 122()

nname: 97
n 97(None)[self.player.sshow_interval = sshow_delays[idx + 1]
]:
	i: 44(t)
	o: 122()

nname: 44
n 44(current_delay != sshow_delays[-1])[sshow_delays = self.sshow_delays
current_delay = self.player.sshow_interval
idx = sshow_delays.index(current_delay)
]:
	i: 0(f)
	o: 97(t), 121(f)

nname: 12
n 12(None)[self.player.rotate(1)
self.player.paused = False
]:
	i: 0(t)
	o: 122()

nname: 0
n 0(self.player.paused)[]:
	i: 
	o: 12(t), 44(f)

nname: 0
n 0(None)[if self.player.paused:
	self.player.rotate(1)
	self.player.paused = False
else:
	sshow_delays = self.sshow_delays
	current_delay = self.player.sshow_interval
	idx = sshow_delays.index(current_delay)
	if current_delay != sshow_delays[-1]:
		self.player.sshow_interval = sshow_delays[idx + 1]
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7628a0c>}
nname: 122
n 122(None)[return True
]:
	i: 12(), 97(), 121()
	o: 

nname: 121
n 121(None)[]:
	i: 44(f)
	o: 122()

nname: 97
n 97(None)[self.player.sshow_interval = sshow_delays[idx - 1]
]:
	i: 44(t)
	o: 122()

nname: 44
n 44(current_delay != sshow_delays[0])[sshow_delays = self.sshow_delays
current_delay = self.player.sshow_interval
idx = sshow_delays.index(current_delay)
]:
	i: 0(f)
	o: 97(t), 121(f)

nname: 12
n 12(None)[self.player.rotate(-1)
self.player.paused = False
]:
	i: 0(t)
	o: 122()

nname: 0
n 0(self.player.paused)[]:
	i: 
	o: 12(t), 44(f)

nname: 0
n 0(None)[if self.player.paused:
	self.player.rotate(-1)
	self.player.paused = False
else:
	sshow_delays = self.sshow_delays
	current_delay = self.player.sshow_interval
	idx = sshow_delays.index(current_delay)
	if current_delay != sshow_delays[0]:
		self.player.sshow_interval = sshow_delays[idx - 1]
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76284ac>}
nname: 6
n 6(None)[__doc__ = '\n    Event manager for Image universe\n    '
sshow_delays = config.HMI_PHOTO['slideshow']
def __init__(self, player):
	GenericPlayerEventHandler.__init__(self, player)
	self.player.sshow_interval = self.sshow_delays[0]

def event_action_menu(self, event):
	self.player.paused_hand_status = self.player.paused
	self.player.paused = True
	return GenericPlayerEventHandler.event_action_menu(self, event)

def event_select(self, event):
	self.player.toggle_pause()
	return True

def event_up(self, event):
	louie_send('event_up', self.player)
	self.player.select(-event.arg['count'])
	return True

def event_down(self, event):
	louie_send('event_up', self.player)
	self.player.select(event.arg['count'])
	return True

def event_left(self, event):
	return self.event_up(event)

def event_right(self, event):
	return self.event_down(event)

def event_wheel_fwd(self, event):
	if self.player.paused:
		self.player.rotate(1)
		self.player.paused = False
	else:
		sshow_delays = self.sshow_delays
		current_delay = self.player.sshow_interval
		idx = sshow_delays.index(current_delay)
		if current_delay != sshow_delays[-1]:
			self.player.sshow_interval = sshow_delays[idx + 1]
	return True

def event_wheel_rwd(self, event):
	if self.player.paused:
		self.player.rotate(-1)
		self.player.paused = False
	else:
		sshow_delays = self.sshow_delays
		current_delay = self.player.sshow_interval
		idx = sshow_delays.index(current_delay)
		if current_delay != sshow_delays[0]:
			self.player.sshow_interval = sshow_delays[idx - 1]
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7622a8c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from peewee.messages import send as louie_send
import pygui.config as config
from pygui.eventmanager.players import GenericPlayerEventHandler
class ImageEventHandler(GenericPlayerEventHandler):
	__doc__ = '\n    Event manager for Image universe\n    '
	sshow_delays = config.HMI_PHOTO['slideshow']
	def __init__(self, player):
		GenericPlayerEventHandler.__init__(self, player)
		self.player.sshow_interval = self.sshow_delays[0]

	def event_action_menu(self, event):
		self.player.paused_hand_status = self.player.paused
		self.player.paused = True
		return GenericPlayerEventHandler.event_action_menu(self, event)

	def event_select(self, event):
		self.player.toggle_pause()
		return True

	def event_up(self, event):
		louie_send('event_up', self.player)
		self.player.select(-event.arg['count'])
		return True

	def event_down(self, event):
		louie_send('event_up', self.player)
		self.player.select(event.arg['count'])
		return True

	def event_left(self, event):
		return self.event_up(event)

	def event_right(self, event):
		return self.event_down(event)

	def event_wheel_fwd(self, event):
		if self.player.paused:
			self.player.rotate(1)
			self.player.paused = False
		else:
			sshow_delays = self.sshow_delays
			current_delay = self.player.sshow_interval
			idx = sshow_delays.index(current_delay)
			if current_delay != sshow_delays[-1]:
				self.player.sshow_interval = sshow_delays[idx + 1]
		return True

	def event_wheel_rwd(self, event):
		if self.player.paused:
			self.player.rotate(-1)
			self.player.paused = False
		else:
			sshow_delays = self.sshow_delays
			current_delay = self.player.sshow_interval
			idx = sshow_delays.index(current_delay)
			if current_delay != sshow_delays[0]:
				self.player.sshow_interval = sshow_delays[idx - 1]
		return True



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761cd0c>}
from __future__ import absolute_import
from peewee.messages import send as louie_send
import pygui.config as config
from pygui.eventmanager.players import GenericPlayerEventHandler
class ImageEventHandler(GenericPlayerEventHandler):
	__doc__ = '\n    Event manager for Image universe\n    '
	sshow_delays = config.HMI_PHOTO['slideshow']
	def __init__(self, player):
		GenericPlayerEventHandler.__init__(self, player)
		self.player.sshow_interval = self.sshow_delays[0]

	def event_action_menu(self, event):
		self.player.paused_hand_status = self.player.paused
		self.player.paused = True
		return GenericPlayerEventHandler.event_action_menu(self, event)

	def event_select(self, event):
		self.player.toggle_pause()
		return True

	def event_up(self, event):
		louie_send('event_up', self.player)
		self.player.select(-event.arg['count'])
		return True

	def event_down(self, event):
		louie_send('event_up', self.player)
		self.player.select(event.arg['count'])
		return True

	def event_left(self, event):
		return self.event_up(event)

	def event_right(self, event):
		return self.event_down(event)

	def event_wheel_fwd(self, event):
		if self.player.paused:
			self.player.rotate(1)
			self.player.paused = False
		else:
			sshow_delays = self.sshow_delays
			current_delay = self.player.sshow_interval
			idx = sshow_delays.index(current_delay)
			if current_delay != sshow_delays[-1]:
				self.player.sshow_interval = sshow_delays[idx + 1]
		return True

	def event_wheel_rwd(self, event):
		if self.player.paused:
			self.player.rotate(-1)
			self.player.paused = False
		else:
			sshow_delays = self.sshow_delays
			current_delay = self.player.sshow_interval
			idx = sshow_delays.index(current_delay)
			if current_delay != sshow_delays[0]:
				self.player.sshow_interval = sshow_delays[idx - 1]
		return True



